Ignore images in the toplevel theme directory, avoiding one source of
authorMatthias Clasen <mclasen@redhat.com>
Tue, 5 Feb 2008 22:20:12 +0000 (22:20 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 5 Feb 2008 22:20:12 +0000 (22:20 +0000)
2008-02-05  Matthias Clasen  <mclasen@redhat.com>

        * gtk/updateiconcache.c: Ignore images in the toplevel theme
        directory, avoiding one source of invalid caches that has been
        spotted in the wild.

svn path=/trunk/; revision=19466

ChangeLog
gtk/updateiconcache.c

index 56c7863d31a51147a70b0f92cc810e5ed64f6a82..9ea889b749a58198b7c02266dee4e1e2c5204895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/updateiconcache.c: Ignore images in the toplevel theme
+       directory, avoiding one source of invalid caches that has been
+       spotted in the wild.
+
 2008-02-05  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/updateiconcache.c: Fix the previous commit to compile.
index 84fd0e007c39c57f99f48e5602c30bc35695bd21..f67210b9c9a1ba264d6a5cca7e7bb1b459159534 100644 (file)
@@ -623,6 +623,10 @@ scan_directory (const gchar *base_path,
          continue;
        }
 
+      /* ignore images in the toplevel directory */
+      if (subdir == NULL)
+        continue;
+
       retval = g_file_test (path, G_FILE_TEST_IS_REGULAR);
       if (retval)
        {
@@ -1473,7 +1477,7 @@ build_cache (const gchar *path)
   if (!validate_file (tmp_cache_path))
     {
       g_printerr (_("The generated cache was invalid.\n"));
-      g_unlink (tmp_cache_path);
+      //g_unlink (tmp_cache_path);
       exit (1);
     }